import yaml

from config.setting import config


class yamlhandler():
    def __init__(self,file):
        self.file = file
    def open_yaml(self,encoding="utf8"):
        f = open(self.file,encoding=encoding)
        yamal_data = yaml.load(f,Loader=yaml.FullLoader)
        f.close()
        return (yamal_data)

if __name__ == '__main__':
    data = yamlhandler(config.yaml_path).open_yaml()
    print(data)